package baiguoyuan.kafka.simple;


import com.mongodb.MongoClient;
import com.mongodb.client.MongoDatabase;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CeShi {
    public static void main(String[] args) {

        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
        System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
        try {
            MongoClient mongoClient = new MongoClient( "localhost" , 27017 );
            MongoDatabase mongoDatabase = mongoClient.getDatabase("mycol");

        } catch (Exception e) {

        }
        SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
        System.out.println(df1.format(new Date()));// new Date()为获取当前系统时间
    }
}